<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../../../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>Goo</h1>
<ul>
	
	<li><a href="../../../index.html">Index</a></li>
	
</ul>


<!-- Module list -->

<h1>Modules</h1>
<ul>

	<li>
		<a href="../../../modules/anim.html">anim</a>
	</li>

	<li>
		<a href="../../../modules/goo.html">goo</a>
	</li>

	<li>
		<a href="../../../modules/goo.button.html">goo.button</a>
	</li>

	<li>
		<a href="../../../modules/goo.checkbox.html">goo.checkbox</a>
	</li>

	<li>
		<a href="../../../modules/goo.colorpick.html">goo.colorpick</a>
	</li>

	<li>
		<a href="../../../modules/goo.image.html">goo.image</a>
	</li>

	<li>
		<a href="../../../modules/goo.null.html">goo.null</a>
	</li>

	<li>
		<a href="../../../modules/goo.object.html">goo.object</a>
	</li>

	<li>
		<a href="../../../modules/goo.panel.html">goo.panel</a>
	</li>

	<li>
		<a href="../../../modules/goo.progressbar.html">goo.progressbar</a>
	</li>

	<li>
		<a href="../../../modules/goo.text.html">goo.text</a>
	</li>

	<li>
		<a href="../../../modules/goo.textinput.html">goo.textinput</a>
	</li>

</ul>



<!-- File list -->

<h1>Files</h1>
<ul>

	<li>
		<a href="../../../files/docs/luadoc/anim.html">docs/luadoc/anim.luadoc</a>
	</li>

	<li><strong>docs/luadoc/goo.button.luadoc</strong></li>
	
	<li>
		<a href="../../../files/docs/luadoc/goo.checkbox.html">docs/luadoc/goo.checkbox.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.colorpick.html">docs/luadoc/goo.colorpick.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.image.html">docs/luadoc/goo.image.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.html">docs/luadoc/goo.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.null.html">docs/luadoc/goo.null.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.object.html">docs/luadoc/goo.object.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.panel.html">docs/luadoc/goo.panel.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.progressbar.html">docs/luadoc/goo.progressbar.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.text.html">docs/luadoc/goo.text.luadoc</a>
	</li>

	<li>
		<a href="../../../files/docs/luadoc/goo.textinput.html">docs/luadoc/goo.textinput.luadoc</a>
	</li>

</ul>






</div> <!-- id="navigation" -->

<div id="content">

<h1>File <code>docs/luadoc/goo.button.luadoc</code></h1>


<p>Button object</p>






<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#goo.button:onClick">goo.button:onClick</a>&nbsp;()</td>
	<td class="summary">Callback function when clicked <br/>See <a href="goo.object.html#onClick">goo.object:onClick()</a> </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#goo.button:setText">goo.button:setText</a>&nbsp;(text)</td>
	<td class="summary">Set the text of the button </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#goo.button:sizeToText">goo.button:sizeToText</a>&nbsp;(padding)</td>
	<td class="summary">Automatically size the button to fit the text.</td>
	</tr>

</table>









<br/>
<br/>




<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="goo.button:onClick"></a><span>goo.button:</span><strong>onClick</strong>&nbsp;(  )</dt>
<dd>
<p class="func_description">Callback function when clicked <br/>See <a href="goo.object.html#onClick">goo.object:onClick()</a></p>




<h3>Usage:</h3>
<pre class='example'> local button = goo.button:new()<br /> button.name = 'bob'<br /> function button:onClick(x,y,button)<br /> 	if button == 'l' then<br /> 		print(self.name .. ' has been clicked')<br /> 	end<br /> end<br /> -- when the button is clicked with left mouse button it prints:<br /> -- bob has been clicked</pre><br />





</dd>




<dt><a name="goo.button:setText"></a><span>goo.button:</span><strong>setText</strong>&nbsp;( text )</dt>
<dd>
<p class="func_description">Set the text of the button</p>








</dd>




<dt><a name="goo.button:sizeToText"></a><span>goo.button:</span><strong>sizeToText</strong>&nbsp;( padding )</dt>
<dd>
<p class="func_description">Automatically size the button to fit the text.</p>

<h3>Parameters</h3>
<ul>
	
	
	<li>
	  <b>padding</b> <i><small>:number</small></i><br/>The inside padding, similar to CSS padding.
	</li>
	
	
</ul>








</dd>


</dl>









</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
